package top.deepdesigner.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.deepdesigner.pojo.DtsOrderGoods;
import top.deepdesigner.service.DtsOrderGoodsService;

import java.util.List;

/**
 * Start up <br/>
 * Created with IntelliJ IDEA. <br/>
 * Project Name: shop_manage <br/>
 * Author: duanruiqing <br/>
 * DateTime: 2022/9/22 星期四 20:31:27 <br/>
 */
@Service
public class DtsOrderGoodsServiceImpl extends ServiceImpl<BaseMapper<DtsOrderGoods>, DtsOrderGoods> implements DtsOrderGoodsService {
  @Override
  public List<DtsOrderGoods> getOrderGoodsByOrderId(Integer id) {
    return this.list(new LambdaQueryWrapper<DtsOrderGoods>()
        .eq(id != null, DtsOrderGoods::getOrderId, id)
        .eq(true, DtsOrderGoods::getDeleted, 0));
  }
}
